<div class="col-md-12">
<div class="group">
<%= link_to("创建新文章", new_post_path , :class => "btn btn-primary pull-right" ) %>
</div>
<div class="col-md-12">
  <table class="table table-hover">
    <thead>
      <tr>
        <td>#</td>
        <td>标题</td>
        <td></td>
      </tr>
    </thead>
    <tbody>
      <% @posts.each do |post| %>
        <tr>
          <td>#</td>
          <td><%= link_to(post.title, post_path(post)) %></td>
          <td><small><%= time_ago_in_words(post.updated_at)%></small></td>
          
        </tr>
      <% end %>
    </tbody>
  </table>
</div>